Skip to content

feat(Registration): Email verification - #2328

Open
Aaron-Detre wants to merge 25 commits into
developfrom
email-verification
Open

feat(Registration): Email verification#2328
Aaron-Detre wants to merge 25 commits into
developfrom
email-verification

Conversation

@Aaron-Detre

@Aaron-Detre Aaron-Detre commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Changes

  • After registration, emailed verification link takes you to the login page.
  • Unverified teachers are not able to log in.
  • Added various confirmation/error messages to the login page.

Test

  • Test with feat(Registration): Email verification WISE-API#335
  • Accounts created before this PR should be verified by default.
  • Depending on the verificationState, below the password input, you should see different confirmation/error messages on the login page:
    • When logging into an account that was previously verified, you shouldn't see any new messages.
    • If your account was just verified by clicking the link, you should see a confirmation that your account was verified.
    • If the verification code doesn't match a user in the database, you should see an error message telling you to try again.
    • The first time you try to log into an unverified account, you should see an error message including a link allowing you to resend the email.
      • If you then try to log into the account again without verifying, you should see an error message including a countdown to wait until you can send another email.
    • If you click to resend the email, you should see a confirmation if it was sent successfully or an error message if it couldn't be delivered (if email isn't set up in application.properties for example).

@Aaron-Detre Aaron-Detre self-assigned this Jul 21, 2026
@Aaron-Detre Aaron-Detre added the enhancement New feature of any size or improvement (UI, performance, security) label Jul 21, 2026
@qltysh

qltysh Bot commented Jul 21, 2026

Copy link
Copy Markdown

❌ 1 blocking issue (1 total)

Tool Category Rule Count
qlty Structure Function with many parameters (count = 6): constructor 1

@qltysh

qltysh Bot commented Jul 21, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

Unable to calculate total coverage change because base branch coverage was not found.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
New Coverage rating: C
src/app/login/login-home/login-home.component.ts76.9%49-50, 53, 60, 98, 111
Total76.9%
🤖 Increase coverage with AI coding...
In the `email-verification` branch, add test coverage for this new code:

- `src/app/login/login-home/login-home.component.ts` -- Lines 49-50, 53, 60, 98, and 111

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@Aaron-Detre
Aaron-Detre marked this pull request as ready for review July 22, 2026 00:12
@hirokiterashima
hirokiterashima requested a review from breity July 22, 2026 16:38

@breity breity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Functionality works well. I split some of the verification messages into separate elements to simplify the i18n messages. I also cleaned up the login-home template a little.

One issue: If user clicks the link to re-send the verification email, the countdown to send another verification email starts properly. But if the user refreshes or reloads the login page and then tries to sign again, the link to send another email shows up and the countdown is reset because the component has been reloaded. Kind of an edge case, so not sure if it's worth addressing, as it would add complexity to the code. @Aaron-Detre @hirokiterashima, what do you think?

@hirokiterashima hirokiterashima left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New auth flow changes look good!

I added some more code improvement suggestions inline. Lmk if you have any questions or want to discuss!

@breity - can you please take a look at styling/wording these screens to make the new visuals stand out a bit more?

Highlight that the action is needed with bold text, colors, icons? I'm not sure if users will read the text because they're all the same size:
Image

"Your email has been verified" => "Thank you for verifying your email. Please sign in to access WISE?"
Image

Comment thread src/app/services/user.service.ts Outdated
private googleUserUrl = '/api/google-user/get-user';
private checkAuthenticationUrl = '/api/user/check-authentication';
private changePasswordUrl = '/api/user/password';
private checkVerifiedUrl = '/api/teacher/is-verified';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer used, remove?

Comment thread src/app/services/user.service.ts Outdated
Comment on lines +79 to +84

isVerified(username: string): Observable<boolean> {
return this.http.get<boolean>(this.checkVerifiedUrl, {
params: new HttpParams().set('username', username)
});
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer used, remove?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature of any size or improvement (UI, performance, security)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants